package org.JQbitorrentClinet.request.rss;

import com.google.gson.reflect.TypeToken;
import lombok.Builder;
import org.JQbitorrentClinet.utils.HttpClientProxyRequestType;
import org.JQbitorrentClinet.base.BaseParam;

import java.util.List;
import java.util.Map;

@Builder
public class RssGetAllArticlesMatchingARuleParam extends BaseParam {
    String ruleName;

    public RssGetAllArticlesMatchingARuleParam(String ruleName) {
        this.ruleName = ruleName;
        requestType = HttpClientProxyRequestType.POSTURLENCODED;
        responseType = new TypeToken<Map<String,List<String>>>(){}.getType();
    }

    @Override
    public String getApiUrl() {
        return "/api/v2/rss/matchingArticles";
    }
}
